
JOGL Chapter 4. Stereo Viewing

From:
  Pro Java 6 3D Game Development
  Andrew Davison
  Apress, April 2007
  ISBN: 1590598172 
  http://www.apress.com/book/bookDisplay.html?bID=10256
  Web Site for the book: http://fivedots.coe.psu.ac.th/~ad/jg2

This chapter does not appear in the book.

Contact Address:
  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat Yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th


If you use this code, please mention my name, and include a link
to the book's Web site.

Thanks,
  Andrew


==================================
StereoGL

StereoGL is a 3D world containing 3 OBJ models, 
which illustrates stereo viewing, either by parallel
user viewing or with crossed eyes.

The user can navigate around the scene using the arrow keys.
Also, ctrl-left_arrow and ctrl-right_arrow translate the camera
left and right, and 'r' resets it to the starting position.


What's Here?
------------
- 5 Java files:
  StereoGL.java, StereoCanvasGL.java, Floor.java,
  KeyStereoCamera.java, EyeCamera.java

- 2 batch files:
  compileGL.bat and runGL.bat

- a models/ directory
  It contains the 3 OBJ models that are loaded into the scene:
    * a red couch:       couch.obj, couch.mtl
    * a penguin:         penguin.obj, penguin.mtl, penguin.gif
    * a rose and a vase: rose+vase.obj, rose+vase.mtl


==================================
Requirements:

* J2SE 5.0 or later from http://java.sun.com/j2se/
  (I use its nanosecond timer, System.nanoTime()).
  I recommend the release version of Java SE 6.

* JOGL, JSR-231 1.1.0, from https://jogl.dev.java.net/
  See the readme.txt file in the top-level directory for 
  details on installing it. 

* The batch files in this directory, compileGL.bat and runGL.bat
  assume that:
    - the JOGL JAR and DLLs are in d:\jogl 
    - the OBJLoader package is also in d:\jogl,
      stored as the JAR OBJLoader.jar

-----

Compilation: 

1. Use the compileGL.bat batch file.

   $ compileGL *.java

-----
Execution: 

Use the runGL.bat batch file, with the name of the program,
StereoGL.

   $ runGL StereoGL
       // for parallel viewing
or
   $ runGL StereoGL -x
      // for cross-eyed viewing

-----------
Last updated: 21st June 2007